package com.starrin.tennisfinder.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * Created by larsstarrin on 04/02/14.
 */
public class DateUtil {

    public String getAsMillisString(Calendar cal) {
        String millsString = String.valueOf(cal.getTimeInMillis());
        return millsString.substring(0, (millsString.length() - 3));
    }

    public String getAsString(Date date) {
        SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd");
        return df.format(date);
    }
}
